Integrand size = 33, antiderivative size = 155 \[ \int \frac {d+e x+f x^2+g x^3}{x \sqrt {a+b x+c x^2}} \, dx=\frac {(4 c f-3 b g) \sqrt {a+b x+c x^2}}{4 c^2}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}-\frac {d \text {arctanh}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{\sqrt {a}}+\frac {\left (8 c^2 e+3 b^2 g-4 c (b f+a g)\right ) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{8 c^{5/2}} \]
1/8*(8*c^2*e+3*b^2*g-4*c*(a*g+b*f))*arctanh(1/2*(2*c*x+b)/c^(1/2)/(c*x^2+b *x+a)^(1/2))/c^(5/2)-d*arctanh(1/2*(b*x+2*a)/a^(1/2)/(c*x^2+b*x+a)^(1/2))/ a^(1/2)+1/4*(-3*b*g+4*c*f)*(c*x^2+b*x+a)^(1/2)/c^2+1/2*g*x*(c*x^2+b*x+a)^( 1/2)/c
Time = 0.64 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.87 \[ \int \frac {d+e x+f x^2+g x^3}{x \sqrt {a+b x+c x^2}} \, dx=\frac {1}{8} \left (\frac {2 (4 c f-3 b g+2 c g x) \sqrt {a+x (b+c x)}}{c^2}+\frac {16 d \text {arctanh}\left (\frac {\sqrt {c} x-\sqrt {a+x (b+c x)}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {\left (-8 c^2 e-3 b^2 g+4 c (b f+a g)\right ) \log \left (c^2 \left (b+2 c x-2 \sqrt {c} \sqrt {a+x (b+c x)}\right )\right )}{c^{5/2}}\right ) \]
((2*(4*c*f - 3*b*g + 2*c*g*x)*Sqrt[a + x*(b + c*x)])/c^2 + (16*d*ArcTanh[( Sqrt[c]*x - Sqrt[a + x*(b + c*x)])/Sqrt[a]])/Sqrt[a] + ((-8*c^2*e - 3*b^2* g + 4*c*(b*f + a*g))*Log[c^2*(b + 2*c*x - 2*Sqrt[c]*Sqrt[a + x*(b + c*x)]) ])/c^(5/2))/8
Time = 0.51 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.08, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2184, 27, 2184, 27, 1269, 1092, 219, 1154, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {d+e x+f x^2+g x^3}{x \sqrt {a+b x+c x^2}} \, dx\) |
\(\Big \downarrow \) 2184 |
\(\displaystyle \frac {\int \frac {(4 c f-3 b g) x^2+2 (2 c e-a g) x+4 c d}{2 x \sqrt {c x^2+b x+a}}dx}{2 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(4 c f-3 b g) x^2+2 (2 c e-a g) x+4 c d}{x \sqrt {c x^2+b x+a}}dx}{4 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 2184 |
\(\displaystyle \frac {\frac {\int \frac {8 d c^2+\left (3 g b^2+8 c^2 e-4 c (b f+a g)\right ) x}{2 x \sqrt {c x^2+b x+a}}dx}{c}+\frac {\sqrt {a+b x+c x^2} (4 c f-3 b g)}{c}}{4 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\int \frac {8 d c^2+\left (3 g b^2+8 c^2 e-4 c (b f+a g)\right ) x}{x \sqrt {c x^2+b x+a}}dx}{2 c}+\frac {\sqrt {a+b x+c x^2} (4 c f-3 b g)}{c}}{4 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 1269 |
\(\displaystyle \frac {\frac {\left (-4 c (a g+b f)+3 b^2 g+8 c^2 e\right ) \int \frac {1}{\sqrt {c x^2+b x+a}}dx+8 c^2 d \int \frac {1}{x \sqrt {c x^2+b x+a}}dx}{2 c}+\frac {\sqrt {a+b x+c x^2} (4 c f-3 b g)}{c}}{4 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 1092 |
\(\displaystyle \frac {\frac {2 \left (-4 c (a g+b f)+3 b^2 g+8 c^2 e\right ) \int \frac {1}{4 c-\frac {(b+2 c x)^2}{c x^2+b x+a}}d\frac {b+2 c x}{\sqrt {c x^2+b x+a}}+8 c^2 d \int \frac {1}{x \sqrt {c x^2+b x+a}}dx}{2 c}+\frac {\sqrt {a+b x+c x^2} (4 c f-3 b g)}{c}}{4 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {8 c^2 d \int \frac {1}{x \sqrt {c x^2+b x+a}}dx+\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c (a g+b f)+3 b^2 g+8 c^2 e\right )}{\sqrt {c}}}{2 c}+\frac {\sqrt {a+b x+c x^2} (4 c f-3 b g)}{c}}{4 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 1154 |
\(\displaystyle \frac {\frac {\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c (a g+b f)+3 b^2 g+8 c^2 e\right )}{\sqrt {c}}-16 c^2 d \int \frac {1}{4 a-\frac {(2 a+b x)^2}{c x^2+b x+a}}d\frac {2 a+b x}{\sqrt {c x^2+b x+a}}}{2 c}+\frac {\sqrt {a+b x+c x^2} (4 c f-3 b g)}{c}}{4 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c (a g+b f)+3 b^2 g+8 c^2 e\right )}{\sqrt {c}}-\frac {8 c^2 d \text {arctanh}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{\sqrt {a}}}{2 c}+\frac {\sqrt {a+b x+c x^2} (4 c f-3 b g)}{c}}{4 c}+\frac {g x \sqrt {a+b x+c x^2}}{2 c}\) |
(g*x*Sqrt[a + b*x + c*x^2])/(2*c) + (((4*c*f - 3*b*g)*Sqrt[a + b*x + c*x^2 ])/c + ((-8*c^2*d*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a + b*x + c*x^2])])/ Sqrt[a] + ((8*c^2*e + 3*b^2*g - 4*c*(b*f + a*g))*ArcTanh[(b + 2*c*x)/(2*Sq rt[c]*Sqrt[a + b*x + c*x^2])])/Sqrt[c])/(2*c))/(4*c)
3.3.83.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2 Subst[I nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a , b, c}, x]
Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym bol] :> Simp[-2 Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c , d, e}, x]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Simp[(e*f - d*g)/e Int[(d + e*x)^m*(a + b*x + c*x^2)^ p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && !IGtQ[m, 0]
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p _), x_Symbol] :> With[{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, S imp[f*(d + e*x)^(m + q - 1)*((a + b*x + c*x^2)^(p + 1)/(c*e^(q - 1)*(m + q + 2*p + 1))), x] + Simp[1/(c*e^q*(m + q + 2*p + 1)) Int[(d + e*x)^m*(a + b*x + c*x^2)^p*ExpandToSum[c*e^q*(m + q + 2*p + 1)*Pq - c*f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x)^(q - 2)*(b*d*e*(p + 1) + a*e^2*(m + q - 1) - c *d^2*(m + q + 2*p + 1) - e*(2*c*d - b*e)*(m + q + p)*x), x], x], x] /; GtQ[ q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, c, d, e, m, p}, x] && Pol yQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && !(IGt Q[m, 0] && RationalQ[a, b, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))
Time = 0.72 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.44
method | result | size |
default | \(\frac {e \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}}+g \left (\frac {x \sqrt {c \,x^{2}+b x +a}}{2 c}-\frac {3 b \left (\frac {\sqrt {c \,x^{2}+b x +a}}{c}-\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )}{4 c}-\frac {a \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )+f \left (\frac {\sqrt {c \,x^{2}+b x +a}}{c}-\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )-\frac {d \ln \left (\frac {2 a +b x +2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}}{x}\right )}{\sqrt {a}}\) | \(223\) |
e*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))/c^(1/2)+g*(1/2*x/c*(c*x^2+b* x+a)^(1/2)-3/4*b/c*(1/c*(c*x^2+b*x+a)^(1/2)-1/2*b/c^(3/2)*ln((1/2*b+c*x)/c ^(1/2)+(c*x^2+b*x+a)^(1/2)))-1/2*a/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b *x+a)^(1/2)))+f*(1/c*(c*x^2+b*x+a)^(1/2)-1/2*b/c^(3/2)*ln((1/2*b+c*x)/c^(1 /2)+(c*x^2+b*x+a)^(1/2)))-d/a^(1/2)*ln((2*a+b*x+2*a^(1/2)*(c*x^2+b*x+a)^(1 /2))/x)
Time = 2.08 (sec) , antiderivative size = 733, normalized size of antiderivative = 4.73 \[ \int \frac {d+e x+f x^2+g x^3}{x \sqrt {a+b x+c x^2}} \, dx=\left [\frac {8 \, \sqrt {a} c^{3} d \log \left (-\frac {8 \, a b x + {\left (b^{2} + 4 \, a c\right )} x^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {a} + 8 \, a^{2}}{x^{2}}\right ) - {\left (8 \, a c^{2} e - 4 \, a b c f + {\left (3 \, a b^{2} - 4 \, a^{2} c\right )} g\right )} \sqrt {c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} + 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) + 4 \, {\left (2 \, a c^{2} g x + 4 \, a c^{2} f - 3 \, a b c g\right )} \sqrt {c x^{2} + b x + a}}{16 \, a c^{3}}, \frac {4 \, \sqrt {a} c^{3} d \log \left (-\frac {8 \, a b x + {\left (b^{2} + 4 \, a c\right )} x^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {a} + 8 \, a^{2}}{x^{2}}\right ) - {\left (8 \, a c^{2} e - 4 \, a b c f + {\left (3 \, a b^{2} - 4 \, a^{2} c\right )} g\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) + 2 \, {\left (2 \, a c^{2} g x + 4 \, a c^{2} f - 3 \, a b c g\right )} \sqrt {c x^{2} + b x + a}}{8 \, a c^{3}}, \frac {16 \, \sqrt {-a} c^{3} d \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {-a}}{2 \, {\left (a c x^{2} + a b x + a^{2}\right )}}\right ) - {\left (8 \, a c^{2} e - 4 \, a b c f + {\left (3 \, a b^{2} - 4 \, a^{2} c\right )} g\right )} \sqrt {c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} + 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) + 4 \, {\left (2 \, a c^{2} g x + 4 \, a c^{2} f - 3 \, a b c g\right )} \sqrt {c x^{2} + b x + a}}{16 \, a c^{3}}, \frac {8 \, \sqrt {-a} c^{3} d \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {-a}}{2 \, {\left (a c x^{2} + a b x + a^{2}\right )}}\right ) - {\left (8 \, a c^{2} e - 4 \, a b c f + {\left (3 \, a b^{2} - 4 \, a^{2} c\right )} g\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) + 2 \, {\left (2 \, a c^{2} g x + 4 \, a c^{2} f - 3 \, a b c g\right )} \sqrt {c x^{2} + b x + a}}{8 \, a c^{3}}\right ] \]
[1/16*(8*sqrt(a)*c^3*d*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 - 4*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(a) + 8*a^2)/x^2) - (8*a*c^2*e - 4*a*b*c*f + (3*a *b^2 - 4*a^2*c)*g)*sqrt(c)*log(-8*c^2*x^2 - 8*b*c*x - b^2 + 4*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) - 4*a*c) + 4*(2*a*c^2*g*x + 4*a*c^2*f - 3*a* b*c*g)*sqrt(c*x^2 + b*x + a))/(a*c^3), 1/8*(4*sqrt(a)*c^3*d*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 - 4*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(a) + 8*a^2) /x^2) - (8*a*c^2*e - 4*a*b*c*f + (3*a*b^2 - 4*a^2*c)*g)*sqrt(-c)*arctan(1/ 2*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) + 2* (2*a*c^2*g*x + 4*a*c^2*f - 3*a*b*c*g)*sqrt(c*x^2 + b*x + a))/(a*c^3), 1/16 *(16*sqrt(-a)*c^3*d*arctan(1/2*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(-a)/ (a*c*x^2 + a*b*x + a^2)) - (8*a*c^2*e - 4*a*b*c*f + (3*a*b^2 - 4*a^2*c)*g) *sqrt(c)*log(-8*c^2*x^2 - 8*b*c*x - b^2 + 4*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) - 4*a*c) + 4*(2*a*c^2*g*x + 4*a*c^2*f - 3*a*b*c*g)*sqrt(c*x^2 + b*x + a))/(a*c^3), 1/8*(8*sqrt(-a)*c^3*d*arctan(1/2*sqrt(c*x^2 + b*x + a )*(b*x + 2*a)*sqrt(-a)/(a*c*x^2 + a*b*x + a^2)) - (8*a*c^2*e - 4*a*b*c*f + (3*a*b^2 - 4*a^2*c)*g)*sqrt(-c)*arctan(1/2*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) + 2*(2*a*c^2*g*x + 4*a*c^2*f - 3*a*b *c*g)*sqrt(c*x^2 + b*x + a))/(a*c^3)]
\[ \int \frac {d+e x+f x^2+g x^3}{x \sqrt {a+b x+c x^2}} \, dx=\int \frac {d + e x + f x^{2} + g x^{3}}{x \sqrt {a + b x + c x^{2}}}\, dx \]
Exception generated. \[ \int \frac {d+e x+f x^2+g x^3}{x \sqrt {a+b x+c x^2}} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for more deta
Exception generated. \[ \int \frac {d+e x+f x^2+g x^3}{x \sqrt {a+b x+c x^2}} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument Type
Timed out. \[ \int \frac {d+e x+f x^2+g x^3}{x \sqrt {a+b x+c x^2}} \, dx=\int \frac {g\,x^3+f\,x^2+e\,x+d}{x\,\sqrt {c\,x^2+b\,x+a}} \,d x \]